#include <iostream>

#include "EdgeIntersection.h"
#include "Node.h"
#include "Tetrahedron.h"

EdgeIntersection::EdgeIntersection()
{  
	moved_node_ = false;
	sweep_count_ =0;
	where_ = -1;
	closest_ =0;
}

void EdgeIntersection::Print (std::ostream &cout)const
{
	if (moved_node_)
		cout << "(moved)";
	cout << "t =  " << where_ << " point " << point_;

	cout  << " selected " << closest_->Number ()  << " from edge " << edge_ ;
}

bool EdgeIntersection::Valid () const
{
	if(!(closest_ == edge_.GetNode (0) ||
		closest_ == edge_.GetNode (1)))
		return false;


	return edge_.GetNode (0)->Valid ()
		&& edge_.GetNode (1)->Valid ();
}

